<template>
  <div class="goods_list">
    <div class="goods_tit">
      <div class="tit_l">
        <van-icon name="good-job" class="like" />
        <h3>商品排行榜</h3>
      </div>
      <div class="tit_r">
        <span>更多</span>
        <van-icon name="arrow" />
      </div>
    </div>
    <div class="goods_conter" v-if="products !== null">
      <Product :products="products"></Product>
    </div>
  </div>
</template>

<script>
const Product = () => import("@/components/Littlecom/Product.vue");
export default {
  name: "FxhDemoGoodsList",

  data() {
    return {
      products: null, //商品
    };
  },
  components: {
    Product,
  },
  async created() {
    const {
      data: { data },
    } = await this.$request("get", "/fxh/product/leaderboard");
    this.products = data;
  },

  mounted() {},

  methods: {},
};
</script>

<style lang="scss" scoped>
.goods_list {
  border-top-right-radius: 5px;
  border-top-left-radius: 5px;
  width: 345px;
  background: white;
  margin-left: 20px;
  .goods_tit {
    padding-top: 10px;
    width: 345px;
    @include between;
    .tit_l {
      display: flex;
      .like {
        z-index: 2;
        background: #ff448f;
        width: 20px;
        color: white;
        border-radius: 50%;
        margin: auto;
      }
      h3 {
        font-size: 17px;
        font-weight: 700;
        color: #282828;
      }
    }
    .tit_r {
      font-size: 12px;
      color: #999;
    }
  }
}
</style>
